home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / pdc / include / stat.h < prev    next >
C/C++ Source or Header  |  1990-04-05  |  2KB  |  45 lines

  1. /*
  2.  * Libraries and headers for PDC release 3.3 (C) 1989 Lionel Hummel.
  3.  * PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
  4.  * PDC I/O Library (C) 1987 by J.A. Lydiatt.
  5.  *
  6.  * This code is freely redistributable upon the conditions that this 
  7.  * notice remains intact and that modified versions of this file not
  8.  * be included as part of the PDC Software Distribution without the
  9.  * express consent of the copyright holders.  No warrantee of any
  10.  * kind is provided with this code.  For further information, contact:
  11.  *
  12.  *  PDC Software Distribution    Internet:                     BIX:
  13.  *  P.O. Box 4006             or hummel@cs.uiuc.edu            lhummel
  14.  *  Urbana, IL  61801-8801       petersen@uicsrd.csrd.uiuc.edu
  15.  */
  16.  
  17. /*  Normally found in <sys/stat.h> */
  18. #define S_IFMT         0170000        /* Mask for file type */
  19. #define S_IEXEC        0000100        /* Owner Execute/search permission */
  20. #define S_IWRITE       0000200        /* Owner Write permission */
  21. #define S_IREAD        0000400        /* Owner Read permission */
  22. #define S_ISVTX        0001000        /* Save swapped text after use */
  23. #define S_ISGID        0002000        /* Set group id on execution */
  24. #define S_ISUID        0004000        /* Set user id on execution */
  25. #define S_IFIFO        0010000        /* A fifo */
  26. #define S_IFCHR        0020000        /* A character special file */
  27. #define S_IFDIR        0040000        /* A directory file */
  28. #define S_IFBLK        0060000        /* A block special file */
  29. #define S_IFREG        0100000        /* A a regular file */
  30. #define S_IFLNK        0120000        /* A symbolic link (BSD) */
  31.  
  32. struct stat {
  33.     ushort st_mode;    /* File mode as used by mknod */
  34.     ino_t st_ino;      /* Inode number */
  35.     dev_t st_dev;      /* Major device number of device containing file */
  36.     dev_t st_rdev;     /* Minor device number of device containing file */
  37.     short st_nlink;    /* Number of links */
  38.     ushort st_uid;     /* File owner's user ID number */
  39.     ushort st_gid;     /* File owner's group ID number */
  40.     off_t st_size;     /* File size in bytes */
  41.     time_t st_atime;   /* Timestamp of last access to file's contents */
  42.     time_t st_mtime;   /* Timestamp of last modification of file */
  43.     time_t st_ctime;   /* Timestamp of file creation */
  44. };
  45.